

set more off


use seasons_2015_2019, clear

log using tables.log, replace


poisson fouls i.home i.post_covid i.post_home i.var i.home_var i.trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id) 

margins, dydx(home post_covid post_home var home_var trav_lt20m ELO_diff)

poisson yellows i.home i.post_covid i.post_home i.var i.home_var i.trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id) 

margins, dydx(home post_covid post_home var home_var trav_lt20m ELO_diff)

poisson reds i.home i.post_covid i.post_home i.var i.home_var i.trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id)

margins, dydx(home post_covid post_home var home_var trav_lt20m ELO_diff)

poisson penalties i.home i.post_covid i.post_home i.var i.home_var i.trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id)

margins, dydx(home post_covid post_home var home_var trav_lt20m ELO_diff)

quietly poisson fouls home post_covid post_home var home_var trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id) 

test home+post_home=0
test post_covid+post_home=0

quietly poisson yellows home post_covid post_home var home_var trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id) 

test home+post_home=0
test post_covid+post_home=0

quietly poisson reds home post_covid post_home var home_var trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id)

test home+post_home=0
test post_covid+post_home=0

quietly poisson penalties home post_covid post_home var home_var trav_lt20m ELO_diff i.season i.team i.opponent, vce(cluster game_id)

test home+post_home=0
test post_covid+post_home=0



reg goal_diff post_covid ELO_diff distance if home==1

reg goal_diff post_covid ELO_diff distance fouls_diff yellow_diff red_diff pk_diff if home==1
**add var

reg goal_diff post_covid ELO_diff distance var if home==1

reg goal_diff post_covid ELO_diff distance var fouls_diff yellow_diff red_diff pk_diff if home==1

log close
